cmake_minimum_required(VERSION 2.6 FATAL_ERROR)
project(cswavelet)
find_package(OpenCV REQUIRED)
find_package(CUDA REQUIRED)
if(CUDA_FOUND)

    set(CUDA_NVCC_FLAGS "-arch;sm_20")
	# collect source files
	file( GLOB src wavelet.cpp )
	file( GLOB hdr *.hpp )
	file( GLOB img *.jpg )
	file( GLOB cu  *.cu)

	#Linking with libcutil (expected to be in ${CUDA_SDK_ROOT_DIR}/C/lib)
	#link_libraries("-L/${CUDA_SDK_ROOT_DIR}/C/lib -lcutil")
	#link_libraries("-L -lcufft")

	link_libraries(cswavelet ${OpenCV_LIBS})
	
	CUDA_ADD_EXECUTABLE(cswavelet ${src} ${hdr} ${img} ${cu})
	CUDA_ADD_CUFFT_TO_TARGET(cswavelet)
else(CUDA_FOUND)
    message("CUDA is not installed on this system.")
endif()


	# if(HAVE_CUFFT)
		# CUDA_ADD_CUFFT_TO_TARGET(${cswavelet})
	# else(HAVE_CUFFT)
		# message("CUFFT is not installed on this system.")
	# endif()

	# if(HAVE_CUBLAS)
		# CUDA_ADD_CUBLAS_TO_TARGET(${cswavelet})
	# else(HAVE_CUFFT)
		# message("CUBLAS is not installed on this system.")
	# endif()


